#include "utracker.h"

#include "free-cube/freecube.h"
#include "free-cube/amasterhandler.h"
#include "free-cube/notation.h"
#include "free-cube/logger.h"
#include "free-cube/fcexception.h"

#include "pattern.h"

UTracker::UTracker(QObject *parent) :
    QObject(parent),
    APlugin("uTracker"),
    pattern_(new Pattern)
{
    QString name_of_file_( QString(getenv("HOME"))+ "/simple_rithm.ptn");
    try { pattern_->load(name_of_file_);}
    catch (fc::FCException & e) {
        fc::log(e.msg());
    }
}

UTracker::~UTracker(){
    delete pattern_;
}


void UTracker::process(size_t size){

    static fc::TimeT ticks_to_process = 0;
    //fc::TimeT ticks_of_bar =
            //handler_->ticks_of_bar(ticks_to_process);
    //pattern_->get_data(*data_, ticks_of_bar, ticks_of_bar + ticks_to_process);

}

